home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gwu / globals.c < prev    next >
C/C++ Source or Header  |  1996-01-30  |  8KB  |  240 lines

  1. /*
  2.     GWAda Development Environment for 386/486 PCs   
  3.     Copyright (C) 1993, Arthur Vargas Lopes  & Michael Bliss Feldman
  4.                         vlopes@vortex.ufrgs.br mfeldman@seas.gwu.edu
  5.  
  6.     This program is free software; you can redistribute it and/or modify
  7.     it under the terms of the GNU General Public License as published by
  8.     the Free Software Foundation; version 2 of the License.    
  9.  
  10.     This program is distributed in the hope that it will be useful,
  11.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.     GNU General Public License for more details.
  14.  
  15.     You should have received a copy of the GNU General Public License
  16.     along with this program; if not, write to the Free Software
  17.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. */
  19.  
  20. /* Globals.c */
  21.  
  22. #include <\gwada\env\ed.h>
  23.  
  24.  
  25. short ScreenAdr, PhyScrCols;
  26. char RetraceMode, Aline, Tline, CtrlAttr;
  27.  
  28.  
  29. /* Run time options */
  30. char avl_monitor_on = '\0';
  31. short avl_heap;
  32. short avl_pgm_stack;
  33. short avl_task_stack;
  34. short avl_scheduller;
  35. char  avl_trace_opts[6];
  36.  
  37. int avl_cur_source = 0;
  38. int avl_cur_tool = 0;
  39. int avl_cur_unit = 0;
  40. int avl_rows     = 0;
  41. int avl_size     = 0;
  42. int avl_ctrl_c = 0;
  43. char current_file_name[200];
  44. char do_not_realy_exit = 0;
  45. int    avl_open_error_file = 0;
  46. AVL_LINE_PTR avl_block_first_line2 = NULL;
  47. AVL_LINE_PTR avl_block_last_line2;
  48. int avl_block_first_col2;
  49. int avl_block_last_col2;
  50. AVL_LINE_PTR avl_block_first_line = NULL;
  51. AVL_LINE_PTR avl_block_last_line;
  52. int avl_block_first_col;
  53. int avl_block_last_col;
  54. AVL_EDIT_WINDOW avl_windows[AVL_MAX_WINDOWS+1];
  55. int avl_window = 0;
  56. int avl_nwindows = 0;
  57. int avl_hscroll_on = 0;
  58. int avl_tab_size = 8;
  59. AVL_LINE_PTR avl_line_temp = NULL;
  60. char avl_blank_line[81];
  61. char *avl_border = "┌┐└┘─│├┤";
  62. char avl_message[80];
  63. char avl_curr_directory[128];
  64. char avl_dir_sources[61];
  65. char avl_dir_library[61];
  66. char avl_find_txt[AVL_MAX_LINEL+10];
  67. char avl_replace_txt[AVL_MAX_LINEL+10];
  68. int avl_no_up_corner = 0;
  69. short avl_txt_color;
  70. short avl_txt_bk_color;
  71. short avl_wnd_color;
  72. short avl_wnd_title = AVL_WIND_TITLE;
  73. short avl_wnd_bk_color;
  74. short avl_que_color;
  75. short avl_que_bk_color;
  76. short avl_pro_color;
  77. short avl_pro_bk_color;
  78. short avl_men_ready;
  79. short avl_men_letter;
  80. short avl_men_word;
  81. short avl_men_bk_color;
  82. short avl_err_color;
  83. short avl_sta_color;
  84. short avl_sta_bk_color;
  85. short avl_msg_bk_color;
  86. short avl_msg_color;
  87.  
  88. AVL_EDIT_WINDOW_PTR avl_w;
  89. AVL_WIN_PTR avl_win1;
  90.  
  91. char avl_version_mark[30];
  92.  
  93. AVL_COLOR_CHOICES avl_cor_choices[AVL_NO_COLORS_OPTS] = {
  94.              {0,"Status             ",&avl_sta_color}
  95.             ,{1,"Status Background  ",&avl_sta_bk_color}
  96.             ,{0,"Editing Text       ",&avl_txt_color}
  97.             ,{1,"Editing Background ",&avl_txt_bk_color}
  98.             ,{0,"Window Title       ",&avl_wnd_title}
  99.             ,{0,"Window Text        ",&avl_wnd_color}
  100.             ,{1,"Window Background  ",&avl_wnd_bk_color}
  101.             ,{0,"Question Text      ",&avl_que_color}
  102.             ,{1,"Question Background",&avl_que_bk_color}
  103.             ,{0,"Prompt Text        ",&avl_pro_color}
  104.             ,{1,"Prompt Background  ",&avl_pro_bk_color}
  105.             ,{0,"Menu Selection     ",&avl_men_ready}
  106.             ,{0,"Menu Letter Option ",&avl_men_letter}
  107.             ,{0,"Menu Word          ",&avl_men_word}
  108.             ,{1,"Menu Background    ",&avl_men_bk_color}
  109.             ,{0,"Error Message      ",&avl_err_color}
  110.             ,{0,"Message Text       ",&avl_msg_color}
  111.             ,{1,"Message Background ",&avl_msg_bk_color}
  112.             };
  113.  
  114. int avl_cor_select = 0;
  115. int avl_cor_bk_sel = 0;
  116. int avl_cor_txt_sel = 0;
  117.  
  118. short avl_codes[157] = {  1,  2,  3,  4,  5,  6,  7,  8, 11, 12
  119.                      , 13, 14, 15, 16, 17, 18, 19, 20, 21, 22
  120.                      , 23, 24, 25, 26, 27, 28, 29, 30, 31,127
  121.                      ,128,129,130,131,132,133,134,135,136,137
  122.                      ,138,139,140,141,142,143,144,145,146,147
  123.                      ,148,149,150,151,152,153,154,155,156,157
  124.                      ,158,159,160,161,162,163,164,165,166,167
  125.                      ,168,169,170,171,172,173,174,175,176,177
  126.                      ,178,179,180,181,182,183,184,185,186,187
  127.                      ,188,189,190,191,192,193,194,195,196,197
  128.                      ,198,199,200,201,202,203,204,205,206,207
  129.                      ,208,209,210,211,212,213,214,215,216,217
  130.                      ,218,219,220,221,222,223,224,225,226,227
  131.                      ,228,229,230,231,232,233,234,235,236,237
  132.                      ,238,239,240,241,242,243,244,245,246,247
  133.                      ,248,249,250,251,252,253,254};
  134.  
  135. short avl_mat_code[8][40];
  136. short avl_codes_row = 0;
  137. short avl_codes_col = 0;
  138.  
  139.  
  140. int avl_cur_menu = 0;
  141.  
  142. int avl_cur_smenu[10] = {2, 0, 0, 0, 0, 0, 0, 0, 0, 0};
  143.  
  144.  
  145. AVL_WIN_PTR avl_env_win = NULL;
  146.  
  147. AVL_TIT avl_menu[AVL_MENU_ITEMS] = {
  148.                    {1, 3,"File"}
  149.                   ,{1, 9,"Edit"}
  150.                   ,{1,15,"Compile"}
  151.                   ,{1,24,"Bind"}
  152.                   ,{1,30,"Run"}
  153.                   ,{1,35,"Window"}
  154.                   ,{1,43,"Options"}
  155.                   ,{1,52,"Ada"}
  156.                   ,{1,57,"Help"}
  157.                   ,{1,63,avl_version_mark}
  158.                   }; 
  159.  
  160. int avl_start_pos = 0;
  161.  
  162. void AVL_HELP_LRM()
  163. {
  164.     char *opts[17];
  165.     int nopt = 0;
  166.     int cmd_ret_code;
  167.     opts[nopt++] = "AdaHelp";
  168.     opts[nopt++] = NULL;
  169. /*    if (AVL_EX_UNIT("ADAHELP", opts))  ;
  170. */
  171.     system("adahelp");
  172. }
  173.  
  174. void AVL_DO_WINDOW();
  175.     
  176. AVL_STIT avl_smenu[9]  =  { /* File */
  177.                            {1, 2,{{1,"Open   ",AVL_OPEN}
  178.                                  ,{1,"Close  ",AVL_CLOSE}
  179.                                  ,{0,"Save   ",AVL_SAVE}
  180.                                  ,{0,"Save As",AVL_SAVE_AS}
  181.                                  ,{0,"Info   ",AVL_ABOUT_GWADA}
  182.                                  ,{0,"DOS Cmd",AVL_DOS_CMD}
  183.                                  ,{0,"Quit  ",AVL_EXIT}
  184.                                  ,{0,"",NULL}}}
  185.                           ,{1, 8,{{1,"Find        ",AVL_PROCESS_FIND}
  186.                                  ,{1,"Replace     ",AVL_PROCESS_REPLACE}
  187.                                  ,{1,"Insert File ",AVL_READ_IN}
  188.                                  ,{1,"Delete Line ",AVL_DO_DEL_LINE}
  189.                                  ,{1,"Special Code",AVL_INSERT_CODES}
  190.                                  ,{1,"Mark Block  ",AVL_GUIDE_MBLOCK}
  191. /*                                 ,{1,"Remove Block",AVL_REMOVE_BLOCK}
  192. */                                 ,{1,"Write Block ",AVL_WRITE_OUT}
  193.                                  ,{1,"Copy Block ",AVL_PROCESS_COPY}
  194.                                  ,{0,"", NULL}}}
  195.                           ,{1,14,{{0,"Current Unit",AVL_COMPILE_CURRENT} /* Compile */
  196. /*                                 ,{0,"Bottom Up",AVL_COMP_ORDER}  
  197. */                                 ,{0,"Select Unit",AVL_COMPILE} 
  198.                                  ,{0,"", NULL}}}
  199.                           ,{1,23,{{1,"",AVL_BIND}}}    /* Bind */
  200.                           ,{1,29,{{1,"",AVL_RUN}}} /* Run */
  201.                           ,{1,33,{{1,"",AVL_DO_WINDOW}}} /* Window */
  202.                           ,{1,42,{{0,"ASCII Table      ",AVL_SHOW_ASCII} /* Options */
  203.                                  ,{0,"Colors           ",AVL_SET_COLORS} 
  204.                                  ,{0,"Directories      ",AVL_SET_DIRECTORIES}
  205.                                  ,{0,"Identation Length",AVL_SET_TAB}
  206.                                  ,{0,"List Library     ",AVL_LIST_LIB}
  207.                                  ,{0,"New Library      ",AVL_NEW_LIB}
  208.                                  ,{0,"Parameters (Run) ",AVL_SET_PARAMETERS}
  209.                                  ,{0,"Read Options     ",AVL_READ_OPTIONS}
  210.                                  ,{0,"Set Defaults     ",AVL_DEFAULT_OPTIONS}
  211.                                  ,{0,"Write Options   ",AVL_SAVE_OPTIONS}
  212.                                  ,{0,"",NULL}}}
  213.                           ,{1,51,{  /*  Ada  */
  214.                                   {1,"Ada Program" ,AVL_TEMPLATE_ADA_PGM}
  215.                                  ,{1,"Access type" ,AVL_TEMPLATE_ADA_ACCESS}
  216.                                  ,{1,"Vector type" ,AVL_TEMPLATE_ADA_VECTOR}
  217.                                  ,{1,"Matrix type" ,AVL_TEMPLATE_ADA_MATRIX}
  218.                                  ,{1,"Record type" ,AVL_TEMPLATE_ADA_RECORD}
  219.                                  ,{1,"Loop       " ,AVL_TEMPLATE_ADA_LOOP}
  220.                                  ,{1,"While      " ,AVL_TEMPLATE_ADA_WHILE}
  221.                                  ,{1,"Case       " ,AVL_TEMPLATE_ADA_CASE}
  222.                                  ,{1,"If         " ,AVL_TEMPLATE_ADA_IF}
  223.                                  ,{1,"Function   " ,AVL_TEMPLATE_ADA_FUNCTION}
  224.                                  ,{1,"Procedure  " ,AVL_TEMPLATE_ADA_PROCEDURE}
  225.                                  ,{1,"Task       " ,AVL_TEMPLATE_ADA_TASK}
  226.                                  ,{1,"Server     " ,AVL_TEMPLATE_ADA_SERVER}
  227.                                  ,{1,"Package   " ,AVL_TEMPLATE_ADA_PACKAGE}
  228. /*                                 ,{1,"Tool Box  " ,AVL_CALL_TOOL}
  229. */                                 ,{0,"",NULL}}}
  230.                           ,{1,46,{  /*  Help  */
  231.                                   {0,"Help Facility",AVL_HELP_LRM}    
  232.                                  ,{0,"Fast Help ",AVL_HOT_KEYS}    
  233.                                  ,{0,"",NULL}}}
  234.                           };
  235.  
  236.  
  237.  
  238.  
  239.     
  240.